package com.ht.base.system.biz;

import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

@EnableDubbo
@EnableDiscoveryClient
@EnableScheduling
@EnableTransactionManagement
@MapperScan(value = {"com.ht.base.system.dao.dao"})
@SpringBootApplication(scanBasePackages = {"com.ht.base.*"})
public class BaseSystemBizApplication {

    public static void main(String[] args) {
        SpringApplication.run(BaseSystemBizApplication.class, args);
        //nohup java -Dspring.profiles.active=dev -Xmx64M -Xss256K -Dfile.encoding=UTF-8 -jar base-system-biz.jar &
//        executeOne();
        System.out.println("base-system......项目启动成功.......................... [ SUCCESS]");
    }

/*    private static void executeOne() {
        ScheduledExecutorService executorService = Executors.newScheduledThreadPool(1);
        executorService.schedule(() -> {
//            onOffConfService.initToRedis();
        }, 1, TimeUnit.SECONDS);
        executorService.shutdown();
    }*/

}
